package org.github.manx98.jlibhac.tools.ncm;

import org.github.manx98.jlibhac.common.math.Uint64;
import org.github.manx98.jlibhac.fs.IStorage;
import org.github.manx98.jlibhac.tools.fssystem.ncautils.TitleVersion;

import java.io.IOException;

/**
 * @author Manx98
 * @version 1.0
 * @since 2022/10/6 18:47
 */
public class CnmtDeltaSetInfo {
    public Uint64 TitleIdOld;
    public Uint64 TitleIdNew;
    public TitleVersion VersionOld;
    public TitleVersion VersionNew;
    public long FragmentSetCount;
    public long DeltaContentCount;

    public CnmtDeltaSetInfo(IStorage reader) throws IOException {
        TitleIdOld = reader.readUint64();
        TitleIdNew = reader.readUint64();
        VersionOld = new TitleVersion(reader.readUint32(), false);
        VersionNew = new TitleVersion(reader.readUint32(), false);
        FragmentSetCount = reader.readLong();
        DeltaContentCount = reader.readLong();
    }
}
